/* Ejercicio 3.34
   ejer3_34.c */
#include <stdio.h>

/* funcion main, el programa inicia aca */
int main( void )
{
    int side;
    int i, j;

    printf( "Enter the side of the square: " );
    scanf( "%d", &side );
    i = 1;

    while ( i <= side ) {

        if ( i == 1 || i == side )
        {
            j = 1;

            while ( j <= side ) {
                printf( "*" );
                ++j;
            }
        }
        else {
            printf( "*" );
            j = 2;

            while ( j < side ) {
                printf( " " );
                ++j;
            }
            printf( "*" );
        }

        printf( "\n" );
        ++i;
    }

	return 0;
} /* fin de la funcion main */
